﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Light.Framework
{
    /// <summary>
    /// 数据库1:n 字段映射特性
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Property)]
    public class HasManyAttribute : Attribute
    {
        /// <summary>
        /// 构造函数：列名和属性名一致的时候用
        /// </summary>
        public HasManyAttribute()
        {
        }
        /// <summary>
        /// 1：n关联中 n的实体类型
        /// </summary>
        public Type Type { get; set; }

        /// <summary>
        /// 外键列名
        /// </summary>
        public string ColumnKey { get; set; }
    }
}
